package com.icloud.wallet.boot.vo;


import com.icloud.common.database.model.RedPacket;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;

@ApiModel("领取红包返回参数")
@Data
public class ReceiveRedPacketVo {
    @ApiModelProperty("红包id")
    private Long redPacketId;

    @ApiModelProperty("红包发送人id")
    private Long createdId;

    @ApiModelProperty("领取人id,红包类型为单发红包或群发专属红包时存在")
    private Long receiveId;

    @ApiModelProperty("群id,群发红包时有,单发红包没有")
    private String groupId;

    @ApiModelProperty("已领取金额")
    private BigDecimal amtReceived;

    public ReceiveRedPacketVo() {
    }

    public ReceiveRedPacketVo(RedPacket redPacket, BigDecimal amtReceived) {
        this.redPacketId = redPacket.getId();
        this.createdId = redPacket.getCreatedId();
        this.receiveId = redPacket.getReceiveId();
        this.groupId = redPacket.getGroupId();
        this.amtReceived = amtReceived;
    }
}
